/**
 * 
 */
package metalink.admin;

import com.opensymphony.xwork2.ActionSupport;

import model.admin.LibraryMo;

/**
 * @author Sony
 * 
 */

public class DeleteBook extends ActionSupport {
	int[] book_id;

	public String execute() {
		LibraryMo mo = new LibraryMo();
		try {
			for (int single_book_id : book_id) {
				System.out.println(book_id.length);
				mo.del(single_book_id);
			}
		} catch (Exception e) {
			System.out.println("in action : " + e.getMessage());
			addActionError(e.getMessage());
			// e.printStackTrace();
		}
		addActionError("Book deleted successfully..");
		return SUCCESS;
	}

	public int[] getBook_id() {
		return book_id;
	}

	public void setBook_id(int[] book_id) {
		this.book_id = book_id;
	}

}
